<template>
	<view class="homepage">
		<view class="toptab">
			<view class="topleft">
				<view class="itemtab" :class="tab===''?'act':''" @click="selecttab('')">
					全部
				<view class="line"></view>
				</view>
				<view class="itemtab" :class="tab===0?'act':''" @click="selecttab(0)">
					待审核
				<view class="line"></view>
				</view>
				<view class="itemtab" :class="tab===1?'act':''" @click="selecttab(1)">
				  已通过
				<view class="line"></view>
				</view>
			</view>
		
		</view>
		
		<view class="list">
			<view class="title" v-if="list.length==0">
				暂无成员
			</view>
			<view class="itemlist" v-for="item in list" :key="item.id" >
				<view class="user" >
					<view class="userleft">
						<view class="lefttop">
							<view class="name">
								{{item.dName}}
							</view>
							
						</view>
						<view class="lefttime">
							{{item.createTime}}
						</view>
					</view>
					<view class="dai" v-if="item.reviewerstatus==0" @click="lookmemberinfo(item)">
						待审核
					</view>
					<view class="pass" v-if="item.reviewerstatus==1">
						已通过
					</view>
				</view>
				</view>
		</view>
		
		
		
		<view class="foot-tabbar" >
			<view class="itemfootbar" @click="goxueshu">
				<image src="/static/tabbar/学位帽.png" mode=""></image>
				<view class="tabbarname ">
					学术
				</view>
			</view>
			<view class="itemfootbar" @click="gouser">
				<image src="/static/tabbar/首页 (1).png" mode=""></image>
				<view class="tabbarname  ">
					用户
				</view>
			</view>
		
		
			<view class="itemfootbar" >
				<image src="/static/tabbar/团队 (1).png" mode=""></image>
				<view class="tabbarname footact">
				成员
				</view>
			</view>
			<view class="itemfootbar" @click="gocenter">
				<image src="/static/tabbar/我的.png" mode=""></image>
				<view class="tabbarname ">
					我的
				</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	import {getTwodailiList} from '../../utils/daili.js'
	export default {
		data() {
			return {
				tab:'',
				list:[],
				list1:[]
			}
		},
		onShow() {
			let p={
				phone:uni.getStorageSync('phone')
			}
			getTwodailiList(p).then(res=>{
				console.log(res)
				this.list=res.data.data
				this.list1=res.data.data
			})
		},
		methods: {
			
			
			
			lookmemberinfo(e){
				let pro=JSON.stringify(e)
				uni.navigateTo({
					url:'/pages/memberinfo/memberinfo?pro='+pro
				})
			},
			selecttab(e){
				this.tab=e
				if(e===''){
					this.list=this.list1
				}else{
					this.list=this.list1.filter(i=>i.reviewerstatus==e)
				}
				
			},
			
			
			
			
			goxueshu(){
				uni.redirectTo({
					url:'/pages/newxueshu/newxueshu'
				})
			},
			gouser(){
				uni.redirectTo({
					url:'/pages/newuser/newuser'
				})
			},
			gocenter(){
				uni.redirectTo({
					url:'/pages/newcenter/newcenter'
				})
			},
		}
	}
</script>

<style lang="less" scoped>
  .homepage{
	  
	  
	  .toptab{
	  		  width: 100%;
	  		  display: flex;
	  		  align-items: center;
	  		  height: 80rpx;
	  		  margin-top: 20rpx;
	  		  justify-content: space-between;
	  		  box-sizing: border-box;
	  		  padding: 20rpx;
	  		  .topleft{
	  			  width: 70%;
	  			  display: flex;
	  			  height: 80rpx;
	  			  align-items: center;
	  			  justify-content: space-evenly;
	  			  .itemtab{
	  			  	width: 50%;
	  					  text-align: center;
	  					  font-size: 30rpx;
	  					  font-weight: bold;
	  					  color: gray;
	  					  .line{
	  						  width: 50rpx;
	  						  height: 6rpx;
	  						  border-radius: 3rpx;
	  						  margin: 6rpx auto;
	  					  }
	  			  }
	  			  .act{
	  				  color: #1a4f8a;
	  				  .line{
	  					  background-color: #1a4f8a;
	  				  }
	  			  }
	  		  }
	  	
	  		  
	  }
	  .list{
	  		  width: 94%;
	  		  box-sizing: border-box;
	  		  margin: auto;
	  		 background-color: white;
			 .title{
				 margin-top: 30rpx;
				 text-align: center;
				 color: gray;
			 }
	  		 .itemlist{
	  			 width: 100%;
	  			 box-sizing: border-box;
	  			 padding: 20rpx;
	  			 margin-bottom: 20rpx;
	  			 .user{
	  				 width: 100%;
	  				 display: flex;
	  				 align-items: center;
	  				 justify-content: space-between;
	  				 .userleft{
	  					 width: 60%;
	  					 .lefttop{
	  						 display: flex;
	  						 align-items: center;
	  						 font-size: 30rpx;
	  						 line-height: 2;
	  						 .name{
	  							 margin-right: 20rpx;
	  							 font-weight: bold;
	  						 }
	  					 }
	  					 .lefttime{
	  						 font-size: 28rpx;
	  						 font-weight: bold;
	  					 }
	  				 }
	  				 .dai{
	  					 background-color: #FFF6E0;
	  					 font-size: 28rpx;
	  					 font-weight: bold;
	  					 color: #904E00;
	  					 padding: 6rpx 8rpx;
	  				 }
					 .pass{
					 	  					 background-color: #C5F8CA;
					 	  					 font-size: 28rpx;
					 	  					 font-weight: bold;
					 	  					 color: #14742F;
					 	  					 padding: 6rpx 8rpx;
					 }
	  				 
	  			 }
	  
	  		 }
	  		  
	  }
	  
	  .foot-tabbar{
	  	width: 100%;
	  	height: 150rpx;
	  	position: fixed;
	  	left: 0;
	  	right: 0;
	  	bottom: 0;
	  	display: flex;
	  	align-items: center;
	  	justify-content: space-evenly;
	  	background: white;
	  	overflow: visible;  /* 允许溢出 */
	  	
	  	.itemfootbar{
	  		width: 20%;
	  		height: 100%;
	  		text-align: center;
	  		image{
	  			width: 60rpx;
	  			height: 60rpx;
	  			margin: auto;
	  		}
	  		.tabbarname{
	  			font-size: 26rpx;
	  			color: #969696;
	  			font-weight: bold;
	  		}
	  		.footact{
	  			color: #1a4f8a;
	  		}
	  		
	  	}
	
	  }
  }
</style>
